var results=new Array("等待","等待重判","编译中","运行并评判","正确","格式错误","答案错误","时间超限","内存超限","输出超限","运行错误","编译错误","编译成功","运行完成");
var languages=new Array("C","C++","Pascal","Java","Ruby","Bash","Python","PHP","Perl","C#","Obj-C","FreeBasic","Scheme","Clang","Clang++","Lua","JavaScript","Go","Other Language");
$(function(){
    $.ajax({
        url:'/solution/status',
        async:true,
        type:'POST',
        data:{
            language:-1,
            result:-1,
        },
        success:function (data) {
            for(var i=0;i<data.list.length;i++){
                var result=results[data.list[i].result];
                var language=languages[data.list[i].language];
                $("#formlist").append("<tr><td>"+data.list[i].userId+"</td><td>"+data.list[i].problemId+"</td><td>"+data.list[i].time+"</td><td>"+data.list[i].memory+"</td><td>"+language+"</td><td>"+data.list[i].codeLength+"</td><td>"+result+"</td><td>"+data.list[i].judgeTime+"</td>></tr>")
            }
        }
    });


})